package com.shhm.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shhm.common.dto.response.business.ProductVO;
import com.shhm.common.entity.common.ProductStatusEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @author JackZ
 * @version 1.0
 * @description: TODO
 * @date 2025/9/2 下午4:12
 */
@Mapper
public interface ProductStatusMapper extends BaseMapper<ProductStatusEntity> {
    int auditProduct(ProductVO entity);

    @Update("update tb_product as tp right join tb_product_status as tps on tps.product_num=tp.product_num set tps.product_status=2 where tp.product_id=#{productId} and tps.product_status=1")
    Integer customUpdate(Integer productId);
}
